<template>
</template>

<script>
	import * as api from '@/api/user'
	import storage from '@/utils/storage'
	export default {
		data() {
			return {

			}
		},
		onReady() {
			api.getExamine().then(res => {
				if (res.data.is_examine == 1) {
					if (storage.get('channelId') != false) {
						uni.redirectTo({ url: '/pages/channel/dataList' });
					} else {
						uni.redirectTo({ url: '/pages/channel/login' });
					}
				} else {
					var activityId = storage.get('activityId');
					var recomUserId = storage.get('recomUserId');
					console.log(activityId)
					console.log(recomUserId)
					if (activityId || recomUserId) {
						uni.redirectTo({
							url: '/pages/activity/index?activityId=' + activityId + ((recomUserId == 'false' || recomUserId == false) ? '' : ('&recomUserId=' + recomUserId))
						})
					}
				}
			});
		},
		methods: {

		}
	}
</script>

<style>
</style>
